home *** CD-ROM | disk | FTP | other *** search
/ The Scorpion King Cardz / The Scorpion King Cardz - Disc 2 - Cassandra.iso / pc / assets / scorp_game.dxr / 00004.ls < prev    next >
Encoding:
Text File  |  2002-03-21  |  1.6 KB  |  60 lines

  1. global oDrawStage, oOrbitCenter, oOrbitNodes, oOrbitButtons, oRollText, oExitButton, oBackButton, gMouseState, gPrevMouseLoc, oStoneRects, oDoor, oStones, gSubNavState, oLetters, gPrevMill, pGovTicks, gFPS, oMusicButton, wMusic, gCloseWinFlag
  2.  
  3. on exitFrame me
  4.   gFPS = float(1000) / float(the milliSeconds - gPrevMill)
  5.   gPrevMill = the milliSeconds
  6.   if gFPS > 45 then
  7.     pGovTicks = pGovTicks + 1
  8.     if pGovTicks > 22 then
  9.       pGovTicks = 0
  10.     end if
  11.   else
  12.     pGovTicks = 0
  13.   end if
  14.   if (pGovTicks = 0) and (wMusic <> window("soundtrack")) then
  15.     repeat with i = 1 to count(oOrbitNodes)
  16.       moveNodes(oOrbitNodes[i])
  17.     end repeat
  18.     if oOrbitCenter <> EMPTY then
  19.       moveOrbitCenter(oOrbitCenter)
  20.     end if
  21.     if oRollText <> EMPTY then
  22.       blendRollText(oRollText)
  23.     end if
  24.     gMouseState = isMouseMoving()
  25.     gPrevMouseLoc = the mouseLoc
  26.     repeat with i = 1 to count(oStones)
  27.       checkStone(oStones[i])
  28.     end repeat
  29.     if gMouseState <> 2 then
  30.       if oBackButton <> EMPTY then
  31.         checkBack(oBackButton)
  32.       end if
  33.       if oExitButton <> EMPTY then
  34.         checkExit(oExitButton)
  35.       end if
  36.       if oMusicButton <> EMPTY then
  37.         checkMusicButton(oMusicButton)
  38.       end if
  39.       if oDoor <> EMPTY then
  40.         checkDoor(oDoor)
  41.       end if
  42.     end if
  43.     repeat with i = 1 to count(oLetters)
  44.       oLetters[i].moveLetter()
  45.     end repeat
  46.     if gSubNavState = 1 then
  47.       repeat with i = 1 to 3
  48.         createLetters()
  49.       end repeat
  50.     end if
  51.     oDrawStage.mainLoop()
  52.   end if
  53.   if gCloseWinFlag = 1 then
  54.     setUpAudio()
  55.     oDrawStage.pPunchFlag = 0
  56.     gCloseWinFlag = 0
  57.   end if
  58.   go(the frame)
  59. end
  60.